From: Thomas Fischer Date: Thu, 23 May 2024 17:59:51 +0000 (+0200) Subject: [PATCH] Switch to C++17 for recent ICU4C versions X-Git-Tag: archive/raspbian/0.10.0-4+rpi1^2~1 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=5d1b37f1dd10ad9b0e351450c9dbb14446ebaee8;p=kbibtex.git [PATCH] Switch to C++17 for recent ICU4C versions Starting with ICU version 75, it makes use of C++ 17 constructs, so KBibTeX no longer compiles if C++ is still set to C++ 11. With this change, the C++ standard is raised to C++17 if a recent ICU is detected. Gbp-Pq: Name upstream_Switch-to-C-17-for-recent-ICU4C-versions.patch --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 901e697..4ae3d63 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -137,6 +137,10 @@ find_package( ) if(ICU_FOUND) add_definitions(-DHAVE_ICU) + if(ICU_VERSION GREATER_EQUAL 75) + # Starting with ICU 75, it makes use of C++17 instead of C++11 before + set(CMAKE_CXX_STANDARD 17) + endif() endif() option(